package com.itheima.demo;

public class Test2 {
    public static void main(String[] args) {
        getBellow(new Animal(){
            @Override
            public void bellow() {
                System.out.println("狗，汪汪汪");
            }
        });

    }

    public static void getBellow(Animal animal){
        animal.bellow();
    }
}

class Animal{
    public void bellow(){
        System.out.println("动物叫");
    }
}
